package dto

import "go_gin_gorm_oceanlearn_study/model"

type UserDto struct {
	Name      string `json:"name"`
	Telephone string `json:"telephone"`
}

func ToUserDto(user model.User) UserDto { //转换函数
	return UserDto{
		Name: user.Name,
		Telephone: user.Telephone,
	}
}